#!/bin/sh
#
#$1: localhost ip
#$2: osd number of osd has down
#$2: new disk drive(like sdb,sdc...sdn)

ip=$1
osdnum=$2
dev=$3

workdir='/home/ceph-deploy.d'

cd ${workdir}

sh ${workdir}/do-rm-osd.sh $osdnum

ceph-deploy --overwrite-conf osd prepare $ip:/dev/${dev}
ceph-deploy --overwrite-conf osd activate $ip:/dev/${dev}1

